package com.andy.qhb.action;

import java.util.Map;

import org.apache.commons.collections.MapUtils;
import org.springframework.stereotype.Component;

import com.andy.qhb.dao.DaoUtils;
import com.andy.qhb.entity.UsrMsgLog;
import com.andy.qhb.game.GameUtils;
import com.andy.qhb.game.GameUser;
import com.andy.qhb.utils.GmAction;
import com.andy.qhb.utils.SendUtil;
import com.andy.qhb.websocket.MySocketSession;

/**
 * 确认好友邀请
 * @author cuiwm
 *
 */
@Component(GmAction.ACTION_PREFIX+GmAction.ACTION_116)
public class Action116 implements IWebAction{

	@Override
	public void doAction(MySocketSession myWebSocket, Map<String, Object> data) {
		GameUser gameUser = myWebSocket.getUser();
		
		Integer msgId = MapUtils.getInteger(data, "msgId");
		UsrMsgLog msgLog = DaoUtils.get(msgId, UsrMsgLog.class);
		
		GameUser cachUsr = GameUtils.getUsrUser(msgLog.getUid());
		
		SendUtil.send111(myWebSocket,cachUsr.getUser());
	}

	
	
	
}
